GDK-Win32: Make update_stye_bits() available within the backend
authorChun-wei Fan <fanchunwei@src.gnome.org>
Tue, 8 Mar 2016 05:00:49 +0000 (13:00 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Tue, 8 Mar 2016 05:26:59 +0000 (13:26 +0800)
Other portions of the GDK-Win32 backend make use of this function as
layered windows need to be disabled for GL windows and possibly other
parts, so make this function a private function that is available within
the backend.

https://bugzilla.gnome.org/show_bug.cgi?id=763285

gdk/win32/gdkglcontext-win32.c
gdk/win32/gdkwindow-win32.c
gdk/win32/gdkwindow-win32.h

index af82903ae32e23e903f06f72f4848fe6b2a2d151..520d253fd2343175299d1dcdc700032755fbf55a 100644 (file)
@@ -75,7 +75,7 @@ _gdk_win32_gl_context_dispose (GObject *gobject)
        * trigger update_style_bits() to enable layered windows again
        */
       if (impl->suppress_layered == 0)
-        gdk_window_set_type_hint (window, gdk_window_get_type_hint (window));
+        _gdk_win32_window_update_style_bits (window);
     }
 
   G_OBJECT_CLASS (gdk_win32_gl_context_parent_class)->dispose (gobject);
@@ -527,7 +527,7 @@ _gdk_win32_gl_context_realize (GdkGLContext *context,
    * disable layered windows by triggering update_style_bits()
    */
   if (impl->suppress_layered == 1)
-    gdk_window_set_type_hint (window, gdk_window_get_type_hint (window));
+    _gdk_win32_window_update_style_bits (window);
 
   return TRUE;
 }
index 0bdb3c398f7853d194c5db55656d6a682244de79..847d878341a0fbcf08f9fa5d11a0f23c285f27d3 100644 (file)
@@ -67,7 +67,6 @@ struct _FullscreenInfo
  */
 #define SWP_NOZORDER_SPECIFIED HWND_TOP
 
-static void     update_style_bits         (GdkWindow         *window);
 static gboolean _gdk_window_get_functions (GdkWindow         *window,
                                            GdkWMFunction     *functions);
 static HDC     _gdk_win32_impl_acquire_dc (GdkWindowImplWin32 *impl);
@@ -1845,7 +1844,7 @@ gdk_win32_window_set_geometry_hints (GdkWindow         *window,
       GDK_NOTE (MISC, g_print ("... GRAVITY: %d\n", geometry->win_gravity));
     }
 
-  update_style_bits (window);
+  _gdk_win32_window_update_style_bits (window);
 }
 
 static void
@@ -2559,7 +2558,7 @@ _gdk_win32_window_lacks_wm_decorations (GdkWindow *window)
       return FALSE;
     }
 
-  /* Keep this in sync with update_style_bits() */
+  /* Keep this in sync with _gdk_win32_window_update_style_bits() */
   /* We don't check what get_effective_window_decorations()
    * has to say, because it gives suggestions based on
    * various hints, while we want *actual* decorations,
@@ -2577,8 +2576,8 @@ _gdk_win32_window_lacks_wm_decorations (GdkWindow *window)
   return !has_any_decorations;
 }
 
-static void
-update_style_bits (GdkWindow *window)
+void
+_gdk_win32_window_update_style_bits (GdkWindow *window)
 {
   GdkWindowImplWin32 *impl = (GdkWindowImplWin32 *)window->impl;
   GdkWMDecoration decorations;
@@ -2657,14 +2656,14 @@ update_style_bits (GdkWindow *window)
 
   if (old_style == new_style && old_exstyle == new_exstyle )
     {
-      GDK_NOTE (MISC, g_print ("update_style_bits: %p: no change\n",
+      GDK_NOTE (MISC, g_print ("_gdk_win32_window_update_style_bits: %p: no change\n",
                               GDK_WINDOW_HWND (window)));
       return;
     }
 
   if (old_style != new_style)
     {
-      GDK_NOTE (MISC, g_print ("update_style_bits: %p: STYLE: %s => %s\n",
+      GDK_NOTE (MISC, g_print ("_gdk_win32_window_update_style_bits: %p: STYLE: %s => %s\n",
                               GDK_WINDOW_HWND (window),
                               _gdk_win32_window_style_to_string (old_style),
                               _gdk_win32_window_style_to_string (new_style)));
@@ -2674,7 +2673,7 @@ update_style_bits (GdkWindow *window)
 
   if (old_exstyle != new_exstyle)
     {
-      GDK_NOTE (MISC, g_print ("update_style_bits: %p: EXSTYLE: %s => %s\n",
+      GDK_NOTE (MISC, g_print ("_gdk_win32_window_update_style_bits: %p: EXSTYLE: %s => %s\n",
                               GDK_WINDOW_HWND (window),
                               _gdk_win32_window_exstyle_to_string (old_exstyle),
                               _gdk_win32_window_exstyle_to_string (new_exstyle)));
@@ -2772,7 +2771,7 @@ gdk_win32_window_set_decorations (GdkWindow      *window,
 
   *impl->decorations = decorations;
 
-  update_style_bits (window);
+  _gdk_win32_window_update_style_bits (window);
 }
 
 static gboolean
@@ -3476,7 +3475,7 @@ gdk_win32_window_unfullscreen (GdkWindow *window)
 
       g_object_set_data (G_OBJECT (window), "fullscreen-info", NULL);
       g_free (fi);
-      update_style_bits (window);
+      _gdk_win32_window_update_style_bits (window);
     }
 }
 
@@ -3676,7 +3675,7 @@ gdk_win32_window_set_type_hint (GdkWindow        *window,
 
   ((GdkWindowImplWin32 *)window->impl)->type_hint = hint;
 
-  update_style_bits (window);
+  _gdk_win32_window_update_style_bits (window);
 }
 
 static GdkWindowTypeHint
index a337e10e12510241266b8e2df6502d96ca6ce936..c8ddd1445d0776fb9bbcfa1d7863c81bd27b861e 100644 (file)
@@ -190,6 +190,8 @@ void  _gdk_win32_window_tmp_reset_bg  (GdkWindow *window,
 void  _gdk_win32_window_tmp_unset_parent_bg (GdkWindow *window);
 void  _gdk_win32_window_tmp_reset_parent_bg (GdkWindow *window);
 
+void  _gdk_win32_window_update_style_bits   (GdkWindow *window);
+
 G_END_DECLS
 
 #endif /* __GDK_WINDOW_WIN32_H__ */